import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: "/index"
    },
    {
      path: '/index',
      name: 'index',
      redirect: "/about",
      component: HomeView,
      children: [{
        path: '/about',
        name: 'about',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/AboutView.vue')
      },
      {
        path: '/about1',
        name: 'about1',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/about1.vue')
      },
      {
        path: '/about2',
        name: 'about2',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/about2.vue')
      },
      {
        path: '/guahao',
        name: 'guahao',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/guahao.vue')
      },
      {
        path: '/zhifu',
        name: 'zhifu',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/zhifu.vue')
      },
      {
        path: '/smrz',
        name: 'smrz',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/smrz.vue')
      }
        ,
      {
        path: '/ghdd',
        name: 'ghdd',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/ghdd.vue')
      },
      {
        path: '/jzrgl',
        name: 'jzrgl',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/jzrgl.vue')
      },
      {
        path: '/xzjzr',
        name: 'xzjzr',
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/xzjzr.vue')
      }
      ]
    },
  ]
})

export default router
